<?php echo $this->view->menssagem; ?>
<div class="panel panel-default">
    <div class="panel-heading" style="font-weight: bolder;text-align: center;">RELATÓRIO DE CONTAS A PAGAR VENCIDAS</div>
</div>
<table class="table table-striped table-hover">
    <thead>
        <tr>
            <th>MÊS</th>
            <th style="text-align: right;">TOTAL DE DESPESAS</th>
            <th style="text-align: center;">MAIOR BENEFICIARIO</th>
        </tr>
    </thead>
    <tbody>
        <?php
        $total = 0;
        if (isset($this->view->lista)) {
            foreach ($this->view->lista as $c) {
                $total = $total + $c['total'];
                echo '<tr>';
                echo '<td>';
                echo \SON\UTIL\Converter::mesExtenco($c['mes']);
                echo '</td>';
                echo "<td align='right'> ";
                echo "R$ " . \SON\UTIL\Converter::doubleParaString($c['total']);
                echo '</td>';
                echo "<td align='center'>";
                echo $this->maiorBeneficiario($c['mes']);
                echo '</td>';
                echo '</tr>';
            }
        }
        ?>
    <th style="font-weight: bold;">TOTAL</th>
    <th style="text-align: right;"><?php echo "R$ " . \SON\UTIL\Converter::doubleParaString($total); ?></th>
    <th></th>

</tbody>
</table>
